package com.fafa.pos.broad;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import com.fafa.pos.activity.LoginActivity;

/**
 * Created by Zhou Bing
 * <p>
 * 2017/9/15.
 */
public class BootCompletedReceiver extends BroadcastReceiver {

    private static final String TAG = "BootCompletedReceiver";

    @Override

    public void onReceive(Context context, Intent intent) {

        Log.d(TAG," 开机自启~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ");
        Log.d(TAG," 开机自启~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ");
        Log.d(TAG," 开机自启~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ");
        Log.d(TAG," 开机自启~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ");
        Log.d(TAG," 开机自启~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ");

        Intent intent1 = new Intent(context, LoginActivity.class);

        //非常重要
        intent1.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

        context.startActivity(intent1);

        //Do the thing u want to do, generally start stubActivity to load the HomePage and then skip to the homeActivity  

    }

}
